package com.traceability.trace.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.traceability.common.annotation.Excel;
import com.traceability.common.core.domain.BaseEntity;

/**
 * 农产品对象 product
 * 
 * @author xulin
 * @date 2025-01-09
 */
public class Product extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long productId;

    /** 农产品名称 */
    @Excel(name = "农产品名称")
    private String productName;

    /** 农产品品种 */
    @Excel(name = "农产品品种")
    private String productType;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /** 保质期截止日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保质期截止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /** 批次号 */
    @Excel(name = "批次号")
    private String batchNumber;

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }
    public void setProductType(String productType) 
    {
        this.productType = productType;
    }

    public String getProductType() 
    {
        return productType;
    }
    public void setProductionDate(Date productionDate) 
    {
        this.productionDate = productionDate;
    }

    public Date getProductionDate() 
    {
        return productionDate;
    }
    public void setExpirationDate(Date expirationDate) 
    {
        this.expirationDate = expirationDate;
    }

    public Date getExpirationDate() 
    {
        return expirationDate;
    }
    public void setBatchNumber(String batchNumber) 
    {
        this.batchNumber = batchNumber;
    }

    public String getBatchNumber() 
    {
        return batchNumber;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("productId", getProductId())
            .append("productName", getProductName())
            .append("productType", getProductType())
            .append("productionDate", getProductionDate())
            .append("expirationDate", getExpirationDate())
            .append("batchNumber", getBatchNumber())
            .toString();
    }
}
